<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>



<isperp:grid gridId="projectGrid" url="project/project/list"
	datatype="local" gridTitle="项目审批" processKey="projectProcess"
	cusViewUrl="project/project/view" cusDialogSize="big" sortname="code"
	sortorder="desc" ondbClickRowEvent="projectGrid.edit(rowid);">
	<jsp:attribute name="toolbar">
	<isperp:treeMenu id="projectApprovalMenu" targetGridId="projectGrid">
		<isperp:async enable="true" url="project/project/processMenu"></isperp:async>
		<isperp:callback onClick="projectApprovalMenuTree_onNodeClick"
				onAsyncSuccess="projectApprovalMenuTree_onNodeClickFirst();">
		</isperp:callback>
	</isperp:treeMenu>
	</jsp:attribute>

	<jsp:attribute name="searchbar">	
	<table class="search-table">
		<tbody>
			<tr>
				<td class="td1">项目编号：</td>
				<td class="td2"><input type="text" field="code" op="cn">
				</td>
				<td class="td1">项目名称：</td>
				<td class="td2"><input type="text" field="name" op="cn">
				</td>
				<td class="td1">项目经理：</td>
				<td class="td2"><input type="text" field="managerName" op="cn">
				</td>
				
				
			</tr>
			<tr>
			    <td class="td1">合同编号：</td>
				<td class="td2" colspan="5"><input type="text" field="contractNo" op="in" style="width: 398px"
						placeholder="多个合同编号搜索可用逗号（,）隔开，如（CT01,CT02）">
				</td>

			</tr>
		</tbody>
	</table>
	</jsp:attribute>
	<jsp:body> 
	<isperp:column name="id" title="id" hidden="true"></isperp:column>
	<%-- <isperp:column name="projectLevel" title="" width="28"
			isFormatterFun="true" formatter="return statusFormatter(cellvalue);">
	</isperp:column> --%>
	<isperp:column name="code" title="项目编号" width="100">
	</isperp:column>
	<isperp:column name="name" title="项目名称" width="160">
	</isperp:column>
	<isperp:column name="account" title="项目金额(元)" width="80">
	</isperp:column>
	<isperp:column name="cusCustomerName" title="客户" width="120">
	</isperp:column>
	<isperp:column name="status" title="状态" width="60">
	</isperp:column>
	<isperp:column name="creatorName" title="创建人" width="70">
	</isperp:column>
	</jsp:body>
</isperp:grid>

<isperp:operate code="PROJ_CHECK"></isperp:operate>
<script type="text/javascript">
	function statusFormatter(cellvalue) {
		if (cellvalue == 'A级')
			return "<img title='A级项目' src='img/project/pa.png'>";
		else if (cellvalue == 'B级')
			return "<img title='B级项目' src='img/project/pb.png'>";
		else if (cellvalue == 'C级')
			return "<img title='C级项目' src='img/project/pc.png'>";
		else if (cellvalue == 'D级')
			return "<img title='D级项目' src='img/project/pd.png'>";
		else if (cellvalue == 'E级')
			return "<img title='E级项目' src='img/project/pe.png'>";
	}
</script>

